import resolvePlugin from '@rollup/plugin-node-resolve';
import commonjsPlugin from '@rollup/plugin-commonjs';
import typescriptPlugin from '@rollup/plugin-typescript';

export default [
  {
    input: 'packages/vue/src/index.ts',
    output: [
      {
        file: './packages/vue/dist/vue.js',
        format: 'iife',
        sourcemap: true,
        name: 'Vue',
      },
      {
        file: './packages/vue/dist/vue.esm.js',
        format: 'esm',
        sourcemap: true,
      },
    ],
    plugins: [
      resolvePlugin(),
      commonjsPlugin(),
      typescriptPlugin({ sourceMap: true }),
    ],
  },
];
